//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.dto.auth;

import com.itheima.pinda.authority.base.entity.SuperEntity.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

@ApiModel(
        value = "ResourceUpdateDTO",
        description = "资源"
)
public class ResourceUpdateDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("主键")
    @NotNull(
            message = "id不能为空",
            groups = {Update.class}
    )
    private Long id;
    @ApiModelProperty("接口名称")
    @NotEmpty(
            message = "接口名称不能为空"
    )
    @Length(
            max = 255,
            message = "接口名称长度不能超过255"
    )
    private String name;
    @ApiModelProperty("菜单ID")
    private Long menuId;
    @ApiModelProperty("接口描述")
    @Length(
            max = 255,
            message = "接口描述长度不能超过255"
    )
    private String describe;

    public static ResourceUpdateDTO.ResourceUpdateDTOBuilder builder() {
        return new ResourceUpdateDTO.ResourceUpdateDTOBuilder();
    }

    public Long getId() {
        return this.id;
    }

    public String getName() {
        return this.name;
    }

    public Long getMenuId() {
        return this.menuId;
    }

    public String getDescribe() {
        return this.describe;
    }

    public ResourceUpdateDTO setId(final Long id) {
        this.id = id;
        return this;
    }

    public ResourceUpdateDTO setName(final String name) {
        this.name = name;
        return this;
    }

    public ResourceUpdateDTO setMenuId(final Long menuId) {
        this.menuId = menuId;
        return this;
    }

    public ResourceUpdateDTO setDescribe(final String describe) {
        this.describe = describe;
        return this;
    }

    public ResourceUpdateDTO() {
    }

    public ResourceUpdateDTO(final Long id, final String name, final Long menuId, final String describe) {
        this.id = id;
        this.name = name;
        this.menuId = menuId;
        this.describe = describe;
    }

    public String toString() {
        return "ResourceUpdateDTO(super=" + super.toString() + ", id=" + this.getId() + ", name=" + this.getName() + ", menuId=" + this.getMenuId() + ", describe=" + this.getDescribe() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof ResourceUpdateDTO)) {
            return false;
        } else {
            ResourceUpdateDTO other = (ResourceUpdateDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label59: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label59;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label59;
                    }

                    return false;
                }

                Object this$name = this.getName();
                Object other$name = other.getName();
                if (this$name == null) {
                    if (other$name != null) {
                        return false;
                    }
                } else if (!this$name.equals(other$name)) {
                    return false;
                }

                Object this$menuId = this.getMenuId();
                Object other$menuId = other.getMenuId();
                if (this$menuId == null) {
                    if (other$menuId != null) {
                        return false;
                    }
                } else if (!this$menuId.equals(other$menuId)) {
                    return false;
                }

                Object this$describe = this.getDescribe();
                Object other$describe = other.getDescribe();
                if (this$describe == null) {
                    if (other$describe != null) {
                        return false;
                    }
                } else if (!this$describe.equals(other$describe)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof ResourceUpdateDTO;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $menuId = this.getMenuId();
        result = result * 59 + ($menuId == null ? 43 : $menuId.hashCode());
        Object $describe = this.getDescribe();
        result = result * 59 + ($describe == null ? 43 : $describe.hashCode());
        return result;
    }

    public static class ResourceUpdateDTOBuilder {
        private Long id;
        private String name;
        private Long menuId;
        private String describe;

        ResourceUpdateDTOBuilder() {
        }

        public ResourceUpdateDTO.ResourceUpdateDTOBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public ResourceUpdateDTO.ResourceUpdateDTOBuilder name(final String name) {
            this.name = name;
            return this;
        }

        public ResourceUpdateDTO.ResourceUpdateDTOBuilder menuId(final Long menuId) {
            this.menuId = menuId;
            return this;
        }

        public ResourceUpdateDTO.ResourceUpdateDTOBuilder describe(final String describe) {
            this.describe = describe;
            return this;
        }

        public ResourceUpdateDTO build() {
            return new ResourceUpdateDTO(this.id, this.name, this.menuId, this.describe);
        }

        public String toString() {
            return "ResourceUpdateDTO.ResourceUpdateDTOBuilder(id=" + this.id + ", name=" + this.name + ", menuId=" + this.menuId + ", describe=" + this.describe + ")";
        }
    }
}
